<?php
require '../../extension/Converter/Csv2Array.php';

$rules[0] = array(
    'name' => 'id',
    'type' => 'string',
);
$rules[1] = array(
    'name' => 'parent',
    'type' => 'string',
);
$rules[2] = array(
    'name' => 'name',
    'type' => 'string',
);
$rules[3] = array(
    'name' => 'desc',
    'type' => 'string',
);
$rules[4] = array(
    'name' => 'money',
    'type' => 'integer',
);

$converter = new Converter_Csv2Array('kapai.csv', 0, $rules);
$converter->ignore(0);
$i = 1;
foreach ($converter as $k => $v) {
    echo "<p>";
    echo "$k:<br />";
    echo "<pre>";
    var_dump($v);
    echo "</pre></p>";
    $i++;
}